import createSSE from "./src/connect";

const sse = createSSE(
  (event) => {
    console.log(event.data);
  },
  (error) => {
    console.error(error);
  }
);
sse(
  "http://localhost/v1/chat-messages",
  { Authorization: `Bearer ${API_KEY}` },
  {
    inputs: {},
    query: "What are the specs of the iPhone 13 Pro Max?",
    response_mode: "streaming",
    conversation_id: "",
    user: "abc-123",
    files: [
      {
        type: "image",
        transfer_method: "remote_url",
        url: "https://cloud.dify.ai/logo/logo-site.png",
      },
    ],
  }
);
